package org.wutopia.rocketmq.exsample.sdgasdg;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@RocketMQMessageListener(
        topic = "ORDER_TOPIC",
        selectorExpression = "payTag || timeoutTag",  // 消费多个Tag
        consumerGroup = "order-consumer-group"
)
public class OrderConsumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String event) {
        log.info("收到订单消息: ID={}", event);
        // 业务处理...
    }
}
